package com.kecheng.com.aop;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.aspectj.lang.JoinPoint;



/**
 * 错误日志记录
 * @author yunxin
 *
 */
public class Error{
	Log log = LogFactory.getLog( this .getClass());
	
	Object afterThrowing(JoinPoint joinPoint, Throwable ex) {
		//System.out.println("异常通知："+ex.getMessage());
		
		String method = joinPoint.getSignature().getName();
		String classname = joinPoint.getTarget().getClass().getName();
		log.error(classname+"类的"+method+"方法报错：", ex);
		//HttpServletResponse response =  ServletActionContext.getResponse();
		return null;
	}
	
}
